<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Test Form 400</title>
 <script type="text/javascript">
 
function raiseAlert(msg)
{
	alert(msg);
}

function validateEmail(field)
{

    var emailRegEx =/^([a-zA-Z0-9])(([a-zA-Z0-9])*([\._-])?([a-zA-Z0-9]))*@(([a-zA-Z0-9\-])+(\.))+([a-zA-Z]{2,4})+$/

    var val = document.getElementById(field);

    if (val.value.search(emailRegEx )==-1){

        val.focus();
        return false;
    }
    else{
        return true;
    }

}

function validateNumeric(field)
{
    var entry = document.getElementById(field);
    var re = /^(-{0,1}\d{1,3},(\d{3},)*\d{3}(\.\d{1,4})?|-{0,1}\d{1,3}(\.\d{1,4})?|-{0,1}\d+(\.\d{1,4})?)$/;
    if(re.test(entry.value)){
        return true;
    }else{
        entry.focus();
        return false;
    }
    return true;

}

function validateAlphabetic(field)
{
    var entry = document.getElementById(field);

    var validChar = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    var strlen = entry.value.length;

    for(var i=0;i<strlen;i++){
        if(validChar.indexOf(entry.value.charAt(i))<0){
            entry.focus();
            return false;
            }
      }

    return true;

}

function validateAlphaNumeric(field)
{
    var entry = document.getElementById(field);

    var re = /^[a-zA-Z0-9]+$/ ;
    if(re.test(entry.value)){
        return true;
    }else{
        entry.focus();
        return false;
    }

    return true;

}

function validateExpression(field,expression)
{
    var entry = document.getElementById(field);

    re = new RegExp(expression) ;

    if(re.test(entry.value)){
        return true;
    }else{
        entry.focus();
        return false;
    }

    return true;

}

function validateNonEmpty(field)
{
    var entry = document.getElementById(field);

    var strlen = entry.value.length;

    if(strlen == 0){
        entry.focus();
        return false;
    }

    return true;

}

function validate_form(thisform)
{
with (thisform)
{
if (validate_email(email,"Not a valid e-mail address!")==false)
  {email.focus();return false;}
}
}
</script>

</head>

<body>

	<form action="" name="myform" method="post">
	<table width="80%" align="center"cellspacing="2" cellpadding="2">
	<tr><td>Student: <input id="Mtype1" type="radio" checked name="member" value="Student"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Faculty: <input type="radio" id="Mtype2" name="member" value="Faculty">
		</td></tr>
		
		<tr><td align="left" width="35%"><p>*Enter your valid email: </td><td align="left"><input type="text" id="email" valid_value="email" required="yes" tagtype="data" value="edr6tgh86tg"></input><br></p></td></tr>
		<tr><td align="left" width="35%"><p>&nbsp;&nbsp;Enter phone number:</td><td align="left"><input type="text" id="phone" valid_value="numeric"  tagtype="data" value="x3456787654356"></input><br></td></tr>
		<tr><td align="left" width="35%"><p>&nbsp;&nbsp;Enter user name:</td><td align="left"><input type="text" id="username" valid_value="alpha-numeric"  tagtype="data" value="xcfgyuhbgfdc bgtyfcvb"> </input><br></td></tr>
		<tr><td align="left" id="400501" width="35%"><p>&nbsp;&nbsp;Enter name:</td><td align="left"><input type="text" id="name" valid_value="alphabetic"  tagtype="data" value="zfgghvjhbjkjgfd"></input><br></td></tr>
		<tr><td align="left" width="35%"><p>&nbsp;&nbsp;Enter comments:</td><td align="left"><textarea rows="5" cols="25" id="ccomments" valid_value="non-empty"  tagtype="data" value="fghgjhj
		gjggjhk
		hhkjo8i"jhgfgjk"; hjh'jhj h"></textarea><br></td></tr>
		<tr><td>Male: <input id="SexM" type="radio" checked name="Sex" value="male"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Female: <input type="radio" id="sexF" name="Sex" value="female">
		</td></tr>
		
		<tr><td>
		    <input type="checkbox" id="bike" name="vehicle" value="Bike">&nbsp;I have a bike<br>
			<input type="checkbox" id="car"  name="vehicle" value="Car">&nbsp;I have a car<br>
			<input type="checkbox"  id="plane" name="vehicle" value="Airplane">&nbsp;I have an airplane: 
		</td></tr>
		
		<tr><td>
		Car: <select name="vehicletype" id="vehicletype">
			<optgroup id="swedishcars" label="Swedish Cars">
				<option id="s1" value="volvo">Volvo</option>
				<option id="s2" value="saab">Saab</option>
			</optgroup>
		<optgroup id="germancars" label="German Cars">
			<option id="g1" value="mercedes">Mercedes</option>
			<option id="g2" value="audi">Audi</option>
		</optgroup>
		</select>

		</td></tr>
		<tr><td align="left" width="35%"><p>&nbsp;&nbsp;Enter text that contain only vowels:<br>&nbsp;&nbsp;(Or leave blank)</td><td align="left"><input type="text" id="vowels"  tagtype="data" valid_value="[aeiouAEIOU]*" value="awedfgyujhmkl"></input><br></td></tr>
		
		<tr>
		<!--	<td align="center" colspan="2"><input type="submit" value="Submit"></td> -->
		<td>
		Fav. food: <select id="favfood" multiple="multiple" name="Food">
			<optgroup id="ff" label="Burgers">
			<option id="ff1" value="Chicken Salad">Chicken Salad</option>
			<option id="ff2">Vegetarian Burger</option>
			</optgroup>
			<optgroup id="cooked" label="Home Cooked">
			<option id="c1" value="Italian Pasta and Olives">Italian Pasta and Olives</option>
			<option id="c2" value="Vegetable Fried Rice">Vegetable Fried Rice</option>
			</optgroup>
		</select>


		</td>
		</tr>  
		</table>

		</form>
    <uniqueness active="yes" key_id="Phone" rep_plcy="replace"></uniqueness>
	<file_info location="c:\a.csv" encoding=""></file_info>
	
	
</body>

<!--
<body>
<form action="submitpage.htm"
onsubmit="return validate_form(this);"
method="post">
Email: <input type="text" name="email" size="30" onchange="alert('email')">
<input type="submit" value="Submit"> 
</form>

</body>
-->
</html>
